<div class="autoload">
	<div class="nav-tabs">
		<ul class="tabs">
			<li style="background:#075DB3;"><a href="###" style="color:#EEE;" class="mailload" act="receivmail" >收 件 箱</a></li>
			<li><a href="###" class="mailload" act="sendmail" >发 件 箱</a></li>
		</ul>
	</div>
	<div id="inbox">
		<div class="inbox_menu">
			<ul class="menu_buttons">
				<li><a class="dnoread">标记未读</a></li>
				<li><a class="disread">标记已读</a></li>
				<li><a class="selectall">全选/全不选</a></li>
				<li><a class="selectfalse">反向选则</a></li>
				<li><a class="DeleteBulk">删除所选</a></li>
			</ul>
			<div class="clear"></div>
		</div>
		
		<table class="msgbox" width="100%">
				<tr>
					<th width="20"></th>
					<th width="40">选择</th>
					<th width="300">标题</th>              
					<th width="200">发件人</th>
					<th width="150">时间</th>
					<th width="100">操作</th>
				</tr>
			<foreach name="list" item="vo">
				<if condition="$vo.IsRead eq 0 "> <!--未读-->
					<tr class="noread" delid="{$vo.Id}" >
						<td class="blank" width="20"></td>
						<td class="checkbox_toggle" style="text-align:center;width:40px;"><input type="checkbox" name="chuse[]" value="{$vo.Id}" /></td>              
						<td class="title" width="200"><b><a href="###" openwindow="Public/Mail/readmail/id/{$vo.Id}/new/true" >{$vo.Title|substr=0,30}...</a></b></td>
						<td class="sender" width="80">
							<switch name="vo.UserType" >
								<case value="0" break="1">系统邮件</case>
								<case value="1" break="1">{$vo.SenderName}</case>
								<case value="2" break="1"><a href="{:U('Student/Home/index')}/id/{$vo.Sender}" title="点击进入个人主页">{$vo.SenderName}</a></case>
								<case value="3" break="1"><a href="{:U('Teacher/Home/index')}/id/{$vo.Sender}" title="点击进入个人主页">{$vo.SenderName}</a></case>
								<case value="4" break="1"><a href="{:U('Officer/Home/index')}/id/{$vo.Sender}" title="点击进入个人主页">{$vo.SenderName}</a></case>
							</switch>
						</td>
						<td class="datetime" width="200">{$vo.CreateDate}</td>
						<td class="deletemsg" width="100">
							<a onclick="return confirm('确定删除？');" target="iframdel" id="Delete_linkBtn" href="__URL__/delmail/id/{$vo.Id}">删除</a>
						</td>
					</tr>
				<else /> <!--已读-->
					<tr class="isread" delid="{$vo.Id}" >
						<td class="blank" width="20"></td>
						<td class="checkbox_toggle" style="text-align:center;width:40px;"><input type="checkbox" name="chuse[]" value="{$vo.Id}" /></td>              
						<td class="title" width="200"><a href="###" openwindow="Public/Mail/readmail/id/{$vo.Id}/new/false" >{$vo.Title|substr=0,30}...</a> </td>
						<td class="sender" width="80">
							<switch name="vo.UserType" >
								<case value="0" break="1">系统邮件</case>
								<case value="1" break="1">{$vo.SenderName}</case>
								<case value="2" break="1"><a href="{:U('Student/Home/index')}/id/{$vo.Sender}" title="点击进入个人主页">{$vo.SenderName}</a></case>
								<case value="3" break="1"><a href="{:U('Teacher/Home/index')}/id/{$vo.Sender}" title="点击进入个人主页">{$vo.SenderName}</a></case>
								<case value="4" break="1"><a href="{:U('Officer/Home/index')}/id/{$vo.Sender}" title="点击进入个人主页">{$vo.SenderName}</a></case>
							</switch>
						</td>
						<td class="datetime" width="200">{$vo.CreateDate}</td>
						<td class="deletemsg" width="100">
							<a onclick="return confirm('确定删除？');" target="iframdel" id="Delete_linkBtn" href="__URL__/delmail/id/{$vo.Id}">删除</a>
						</td>
					</tr>
				</if>
			</foreach>
		</table>
	</div>
	<div class="yahoo2">
		<span id="ctl00_ContentPlaceHolder1_Pager1">
			<for start="1" end="$totalPages+1">
				<span href="__URL__/receivmail/page/{$i}" class='Current' act="loadtlog" style="cursor:pointer;border:1px solid #666;" >{$i}</span>
			</for>
			(第<b>{$page}</b>页/共<b>{$totalPages}</b>页)
		</span>
	</div>
</div>
<script type="text/javascript">
	$(function(){
		obj=$("span[act='loadtlog']");
		obj.live("click",function(){
			$(".mailmain").html("");
			var href=$(this).attr('href');
			$('.mailmain').load(href);
		});
	});
</script>